package com.gupao.jly521.proxy.custom;

import com.gupao.jly521.entity.Person;
import com.gupao.jly521.entity.ProgramPerson;

/**
 * Created by Tom on 2018/3/10.
 */
public class CustomPorxyTest {

    public static void main(String[] args) {

        try {
            /**
             * 这个是 jdk的模式
             */
            Person obj = (Person)new CustomMeipo().getInstance(new ProgramPerson());
            //这里可以看出调用的是class com.gupao.jly521.proxy.custom.$Proxy0
            System.out.println(obj.getClass());
            System.out.println( obj.findGirlFriend());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
